cmake_minimum_required(VERSION 3.23)
project(CppTest)

#https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

add_subdirectory(algorithm)

add_subdirectory(allocator)

add_subdirectory(block_queue)

add_subdirectory(concurrency)

add_subdirectory(coroutine)

if (MSVC)
    add_subdirectory(windows)
    add_subdirectory(openGL)
endif ()

add_subdirectory(design_patterns)

add_executable(sizeof sizeof.cpp)

add_executable(lambda lambda.cpp)

add_executable(variadic variadic.cpp)
add_executable(alignas alignas.cpp)
add_executable(right_value right_value.cpp)
add_executable(virtual_function virtual_function.cpp)
add_executable(enum enum.cpp)
add_executable(smart_pointer smart_pointer.cpp)
add_executable(heap heap.cpp)
add_executable(move_semantics move_semantics.cpp)
add_executable(global_variable global_variable.cpp)
add_executable(type type.cpp)
target_compile_options(type PUBLIC $<$<CXX_COMPILER_ID:MSVC>: /Zc:char8_t- >)